'''
Author: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
Date: 2025-01-16 10:27:42
LastEditors: error: error: git config user.name & please set dead value or install git && error: git config user.email & please set dead value or install git & please set dead value or install git
LastEditTime: 2025-01-16 13:31:15
FilePath: \陈家杰\脚本\1.py
Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
'''
from Crypto.Hash import keccak
from Crypto.Hash import MD5

def md5(msg):
	hash_obj = MD5.new(msg)
	return hash_obj.hexdigest()
def keccak384(msg):
	hash_obj = keccak.new(data=msg, digest_bits=384)
	return hash_obj.hexdigest()
if __name__ == '__main__':
	code = input('输入机器码: ')
	print('版本号 < 3.9.6 (旧版)')
	print('高级版:', md5(f'61305{code}8552'.encode())[8:24])
	print('专业版:', md5(f'2356{code}13593'.encode())[8:24])
	print('版本号 >= 3.9.6 (新版)')
	print('高级版:', keccak384(f'{code}hSf(78cvVlS5E'.encode())[12:28])
	print('专业版:', keccak384(f'{code}FF3Go(*Xvbb5s2'.encode())[12:28])
